﻿CREATE PROCEDURE [dbo].[TempStores_DeleteDuplicates]
AS
DELETE FROM [TempStores]
WHERE Id NOT IN
(
    SELECT MIN(Id)
    FROM [TempStores]
    GROUP BY CountryId, Code
)
RETURN 0